package com.ten.order.dao;

import com.ten.order.vo.PayLogVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ten.common.core.entity.TOrder;
import org.apache.ibatis.annotations.Select;

/**
 * @author ：王薪伟
 * @date ：Created in 2022/12/7 18:29
 * @description：
 * @modified By：
 * @version:
 */
public interface TOrderDao extends BaseMapper<TOrder> {

    @Select(value = "SELECT o.*,p.transaction_id,p.pay_time FROM t_order o JOIN " +
            "t_pay_log p ON o.order_no = p.order_no WHERE o.order_no = #{id}")
    PayLogVo selectOrderAndPayLog(String id);
}
